package com.qf.mapper;

/*
 *  @author Administrator
 *  @version V1.0
 *  @Project smartdeviceplatgorm
 *  @Package com.qf.mapper
 *  @Description
 *  @Date2022/3/17 0017 15:17
 */

import com.qf.bean.SysCategory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysCategoryMapper {
    @Insert("INSERT INTO sys_category (category_name,tx_command,rx_command,command_name,create_by,create_time)" +
            "values (#{categoryName},#{txCommand},#{rxCommand},#{commandName},#{createBy},#{createTime})")
    void addSysCategory(SysCategory sysCategory);

    @Select("SELECT * FROM sys_category WHERE c_id=#{id}")
    SysCategory findById(Integer id);

    @Select("SELECT * FROM sys_category ")
    List<SysCategory> findAll();

    int updateSysCategory(SysCategory category);

    int deleteSysCategory(@Param("ids") List<Integer> ids);
}
